package usersObjects;

/**
 * Created with IntelliJ IDEA.
 * User: xpk
 * Date: 11/12/13
 * Time: 6:51 PM
 * To change this template use File | Settings | File Templates.
 */
public class UserStatistic implements UserBehavior {
    private final String descriptionBehavior = "To View a user statistic";

    @Override
    public String getDescriptionBehavior() {
        return descriptionBehavior;
    }

    @Override
    public boolean executeBehavior(StorageOfUsers currentStorageOfUser, UserCertificate currentUserCertificate) {
        String[] userScores;
        userScores =  currentStorageOfUser.getUserScore(currentUserCertificate).split(";");
        for(String s : userScores) {
            System.out.println(s);
        }
        return false;
    }
}
